package cn.edu.dlut.port.isp.profile;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;

import cn.edu.dlut.port.isp.date.PastLocalDate;

public class ProfileForm {

	@Size(min = 2)
	private String name;

	@Email
	@NotEmpty
	private String email;

	@NotNull
	@PastLocalDate
	private LocalDate birthdate;

	// @NotEmpty
	private List<String> interests = new ArrayList<>();

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public LocalDate getBirthdate() {
		return birthdate;
	}

	public void setBirthdate(LocalDate birthdate) {
		this.birthdate = birthdate;
	}

	public String toString() {
		return this.name + "\t" + this.email + "\t" + this.birthdate;
	}

	public List<String> getInterests() {
		return interests;
	}

	public void setInterests(List<String> interests) {
		this.interests = interests;
	}

}
